<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator"
	prefix="decorator"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page"%>

<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
                    + request.getServerName() + ":"
                    + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<decorator:usePage id="decoratedPage" />
<html>

	<head>
		<title><decorator:title default="深圳交警运维监控建设系统" />
		</title>
		<base href="<%=basePath%>">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" type="text/css"
			href="extjs/resources/css/ext-all.css">
		<link rel="stylesheet" type="text/css"
			href="extjs/resources/css/ext-icon.css">
		<link rel="stylesheet" type="text/css" href="style/main.css">
		<style type="text/css">
#loading-mask {
	Z-INDEX: 20000;
	LEFT: 0px;
	WIDTH: 100%;
	POSITION: absolute;
	TOP: 0px;
	HEIGHT: 100%;
	BACKGROUND-COLOR: white
}

#loading {
	PADDING-RIGHT: 2px;
	PADDING-LEFT: 2px;
	Z-INDEX: 20001;
	LEFT: 45%;
	PADDING-BOTTOM: 2px;
	PADDING-TOP: 2px;
	POSITION: absolute;
	TOP: 40%;
	HEIGHT: auto
}

#loading IMG {
	MARGIN-BOTTOM: 5px
}

#loading .loading-indicator {
	PADDING-RIGHT: 10px;
	PADDING-LEFT: 10px;
	BACKGROUND: white;
	PADDING-BOTTOM: 10px;
	MARGIN: 0px;
	FONT: 12px 宋体, arial, helvetica;
	COLOR: #555;
	PADDING-TOP: 10px;
	HEIGHT: auto;
	TEXT-ALIGN: center
}
</style>
		<script type="text/javascript" src="extjs/ext-all.js"></script>
		<script type="text/javascript" src="extjs/ext-lang-zh_CN.js"></script>
		<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="js/gobal.js"></script>
		<script type="text/javascript" src="extjs/datetime/TimePickerField.js"></script>
		<script type="text/javascript" src="extjs/datetime/DateTimePicker.js"></script>
		<script type="text/javascript" src="extjs/datetime/DateTimeField.js"></script>
		<script type="text/javascript" src="extjs/datetime/DateTimeMenu.js"></script>
		<script type="text/javascript">
<!--
	Ext.QuickTips.init();
	Ext.Loader.setConfig({
				enabled : true
			});
	//jquery让出$符号
	var jq = jQuery.noConflict();
	
	  
	  
	  function showLocale(objD){
			 var yy = objD.getFullYear();
			 var MM = objD.getMonth()+1;
			 if(MM<10){
			 	MM = '0' + MM;
			 }
			 var dd = objD.getDate();
			 if(dd<10){ 
			 	dd = '0' + dd;
			 }
			 var hh = objD.getHours();
			 var hour=objD.getHours();
			 if(hh<10){
			 	 hh = '0' + hh;
			 }
			 var mm = objD.getMinutes();
			 if(mm<10){
			 	mm = '0' + mm;
			 }
			 var ss = objD.getSeconds();
			 if(ss<10){
				 ss = '0' + ss;
			 }
			 var ww = objD.getDay();
			 if  (ww==0){ 
			 	ww="星期日";
			 }else if  (ww==1){
			 	ww="星期一";
			 }else if  (ww==2){
			 	ww="星期二";
			 }else if  (ww==3){
			 	ww="星期三";
			 }else if  (ww==4){
			 	ww="星期四";
			 }else if  (ww==5){
			 	ww="星期五";
			 }else if (ww==6){
			 	ww="星期六";
			 }
			 var hello="";
			 if(hour < 6){
			 	hello="凌晨好";
			 }else if (hour < 9){
			 	hello="早上好";
			 }else if (hour < 12){
			 	hello="上午好";
			 }else if (hour < 14){
			 	hello="中午好";
			 }else if (hour < 17){
			 	hello="下午好";
			 }else if (hour < 19){
			 	hello="傍晚好";
			 }else if (hour < 22){
			 	hello="晚上好";
			 }else {
			 	hello="夜里好";
			 }
			 var session_realname= jq("#session_realnameId").val();
			 //下午好,开发人员! 今天是:2011-08-10 星期三 
			  var str =hello+"，"+session_realname+"！ 今天是："+yy + "-" + MM + "-" + dd+" "+ww + " " + hh + ":" + mm + ":" + ss ;
			 return str;
			}
			function tick(){
			 jq("#realTime").html(showLocale(new Date()));
			 window.setTimeout("tick()", 1000);
			}
			
			

	jq(function(){
		tick();
	});

//-->
</script>
		<decorator:head />
	</head>
	<body>
		<%
		    //如果<meta name="mask" content="true">的值mask 没有或者为true时，则表明需要遮罩层
		    boolean mask = decoratedPage.getProperty("meta.mask") == null ? true
		                    : Boolean.valueOf(decoratedPage
		                                    .getProperty("meta.mask"));
		    if (mask) {
		%>
		<script type="text/javascript">
					//初始界面遮罩层
			Ext.EventManager.on(window, 'load', function(){
			 setTimeout(
				 function() {
					Ext.get('loading').remove();
					Ext.get('loading-mask').fadeOut({remove:true});
					}, 200); 
		
			});
		</script>
		<DIV id="loading-mask"></DIV>
		<div id="loading">
			<DIV class="loading-indicator">
				<IMG style="MARGIN-RIGHT: 8px" height="32" src="images/loading.gif"
					width="36">
				正在初始化,请稍等...
			</DIV>
		</div>
		<%
		    }
		%>
		<decorator:body />
	</body>
</html>
